package com.takanafu.haru.code{
	import mx.collections.ArrayCollection;
	
	public class CodeFunction extends CodeBase{
		protected var arg_count:int = 0;
		
		public function call(params:ArrayCollection):CodeBase{
			if(params == null){
				if(0 != arg_count){
					throw new Error("引数の個数が違います。");
				}
			}else{
				if(params.length != this.arg_count){
					throw new Error("引数の個数が違います。");
				}
			}
			return exec(params);
		}
		public function exec(params:ArrayCollection):CodeBase{
			return null;
		}
	}
}